import request from '@/utils/request'

export function loadDataUrl() {
  return 'workflow-service/api/workflowConfigMng/loadData'
}

export function submitUrl() {
  return 'workflow-service/api/workflowConfigMng/doSubmit'
}

export function deleteUrl() {
  return 'workflow-service/api/workflowConfigMng/doDelete'
}

export function destoryUrl() {
  return 'workflow-service/api/workflowConfigMng/doDestory'
}

export function loadHistoryDataUrl() {
  return 'workflow-service/api/workflowConfigMng/loadHistoryData'
}

export function viewMainData(data) {
  return request({
    url: 'workflow-service/api/workflowConfigMng/toView',
    method: 'post',
    data
  })
}

export function toAdd(data) {
  return request({
    url: 'workflow-service/api/workflowConfigMng/toAdd',
    method: 'post',
    data
  })
}

export function toChange(data) {
  return request({
    url: 'workflow-service/api/workflowConfigMng/toChange',
    method: 'post',
    data
  })
}

export function toCopy(data) {
  return request({
    url: 'workflow-service/api/workflowConfigMng/toCopy',
    method: 'post',
    data
  })
}

export function doSaveConfigUser(data) {
  return request({
    url: 'workflow-service/api/workflowConfigMng/doSaveConfigUser',
    method: 'post',
    data
  })
}

export function addOrEdit(data) {
  return request({
    url: 'workflow-service/api/workflowConfigMng/doSave',
    method: 'post',
    data
  })
}

export function del(data) {
  return request({
    url: 'workflow-service/api/workflowConfigMng/doDelete',
    method: 'post',
    data
  })
}

export function getConfigDetailInfo(mainId, activityId) {
  return request({
    url: 'workflow-service/api/workflowConfigMng/getConfigDetailInfo/' + mainId + '/' + activityId,
    method: 'get'
  })
}

export function getConfigModuleList(mainId) {
  return request({
    url: 'workflow-service/api/workflowConfigMng/getConfigModuleList/' + mainId,
    method: 'get'
  })
}

export function getConfigFormList(mainId) {
  return request({
    url: 'workflow-service/api/workflowConfigMng/getConfigFormList/' + mainId,
    method: 'get'
  })
}

export function getConfigOrgList(mainId) {
  return request({
    url: 'workflow-service/api/workflowConfigMng/getConfigOrgList/' + mainId,
    method: 'get'
  })
}

